<template>
  <view>
    <view class="box" :key="index1" v-for="(job, index1) in list">
      <view @click="goDetail(job)" class="boxes">
        <view class="line">
          <view class="line-name">求职者：</view>
          <view class="line-detail">
            {{ job.realname }}
            {{ job.work_years }}年工龄
          </view>
        </view>
        <view class="line">
          <view class="line-name">联系电话：</view>
          <view class="line-detail">{{ job.tell }}</view>
        </view>
        <view class="line">
          <view class="line-name">当前所在地：</view>
          <view class="line-detail"
            >{{ job.curr_province }}{{ job.curr_city
            }}{{ job.curr_district }}</view
          >
        </view>
        <view class="line">
          <view class="line-name">期望工作地：</view>
          <view class="line-detail"
            >{{ job.expect_province }}{{ job.expect_city
            }}{{ job.expect_district }}</view
          >
        </view>
        <view class="line">
          <view class="line-name">发布时间：</view>
          <view class="line-detail">{{ job.add_time }}</view>
        </view>
        <view class="line">
          <view class="line-name">查看人数：</view>
          <view class="line-detail">{{ job.view_count }}</view>
        </view>

        <view class="line">
          <view class="line-name">工种</view>
          <view class="line-detail">{{ job.work_type_ids }}</view>
        </view>

        <view class="line">
          <view class="line-name">类别</view>
          <view class="line-detail">{{ job.person_struct }}</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: ["list"],
  data() {
    return {};
  },

  methods: {
    goDetail(item) {
      if (item.simple == 0) {
        uni.navigateTo({
          url: "/package/pages/searchJob/list/simpledetail?jobId=" + item.id,
        });
      } else {
        uni.navigateTo({
          url: "/package/pages/searchJob/list/detail?jobId=" + item.id,
        });
      }
    },
  },
};
</script>

<style>
page {
  background: rgb(245, 247, 249);
}
</style>
<style scoped lang="scss">
.boxes {
  background: #fff;
  border-radius: 5px;
  margin: 8px 10px;
	padding: 10px;
  .line {
    display: flex;
    align-items: center;
    &-name {
      color: #999;
    }
    &-detail {
      color: #666;
    }
  }
}
</style>
